<template>
  <div>
    <header-template :title="title" />
    <div class="bodyContent">
      <div class="bods">
        <div class="image">
            <img src="../visualization/Image/jcyj.png" class="center-image" />
          <div class="image-text">用户管理可视化</div>
          <el-button @click="visualization(1,'用户管理可视化')" class="image-button">点击查看</el-button>
        </div>
        <div class="image">
            <img src="../visualization/Image/jhbgl.png" class="center-image" />
          <div class="image-text">项目管理可视化</div>
          <el-button @click="visualization(2,'项目管理可视化')" class="image-button">点击查看</el-button>
        </div>
      </div>
    </div>
  </div>
</template>
<script setup>
import {router} from "@/router";
import {ref} from "vue";
import headerTemplate from "../visualization/headerTemplate.vue"
const title = ref('系统数据可视化')
const visualization = (data,key) => {
  title.value = key
  if (data===1){
    router.push("userKsh")
  }else if (data===2){
    router.push("projectKsh")
  }
}
</script>
<style scoped>
.bodyContent{
  margin-top: -3.5%;
  height: 95.2vh;
  background: url("../visualization/Image/EmergencyCommand.png");
  background-size: cover;
}
.bods{
  display: flex;
  width: 90%;
  margin-left: 5%;
  height: 100%;
  justify-content: center; /* 水平居中 */
}
.image{
  height: 350px;
  margin-left: 20px;
  margin-top: 150px;
  width: 270px;
  background: url("../visualization/Image/homePageBG.png");
  background-size: cover;
}
.center-image {
  width: 170px;
  margin-left: 50px;
  margin-top: 50px;
  height: auto; /* 保持纵横比 */
  background-size: cover; /* 图片背景覆盖 */
}
.image-text{
  text-align: center;
  font-size: 20px;
  color: white;
}
.image-button{
  width: 100px;
  margin-left: 80px;
  margin-top: 15px;
  text-align: center;
  background: none;
  color: lightskyblue;
  border: 1px solid deepskyblue;
}
.image-button:hover{
  background-color: royalblue;
  color: white;
}
</style>













